package bean;

import java.util.LinkedList;
import java.util.List;

/**
 * 数据结构转换测试对象
 * 
 * @author wanglei
 * @date 2022/2/8
 */
public class NodeVo {

    protected Integer id;
    protected Integer pid;
    protected Integer sort;
    protected String name;
    protected List<NodeVo> children;

    public NodeVo() {
        children = new LinkedList<>();
    }

    public NodeVo(Integer id, Integer pid, String name) {
        this.id = id;
        this.pid = pid;
        this.name = name;
        this.children = new LinkedList<>();
    }

    public NodeVo(Integer id, Integer pid, Integer sort, String name) {
        this.id = id;
        this.pid = pid;
        this.sort = sort;
        this.name = name;
        this.children = new LinkedList<>();
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getPid() {
        return pid;
    }

    public void setPid(Integer pid) {
        this.pid = pid;
    }

    public Integer getSort() {
        return sort;
    }

    public void setSort(Integer sort) {
        this.sort = sort;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public List<NodeVo> getChildren() {
        return children;
    }

    public void setChildren(List<NodeVo> children) {
        this.children = children;
    }

    @Override
    public String toString() {
        return "{" +
                "'id':'" + id + '\'' +
                ", 'pid':'" + pid + '\'' +
                ", 'sort':'" + sort + '\'' +
                ", 'name':'" + name + '\'' +
                ", 'children':" + children +
                '}';
    }
}